package persondog;

public class Boy {
	// 身上不拥有狗的引用
	private String name;

	public Boy() {
		super();
	}
	public Boy(String name) {
		super();
		this.name = name;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	//遛狗
	public void walkDog(Dog dog) {
		System.out.println(this.name + "男孩在遛" + dog.getColor() + "颜色的" + dog.getName());
	}
	//喂狗
	public void feedDog(Dog dog) {
		System.out.println(this.name + "男孩在喂" + dog.getColor() + "颜色的" + dog.getName());
	}
}
